

#include "uart.h"
#include "flash.h"
#include "xn297l.h"



void init(void)
{
    CLK_DeInit();
    //内部16M时钟
    CLK_HSICmd(ENABLE);
    //默认为8分频，这里改成不分频
    CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1); 
    myUartInit();
                
    spiInit();  
    initFlash();

    communJudgingXn297lExiststhenConnect();
}

//rx
int main()
{
    init(); 
    while (1)
    {
        pXn297l->read();
    }
}
